<template>
    <view class="min-h-[100vh] bg-[#F6F7F9]">
        <up-navbar title="提现明细" :safeAreaInsetTop="true" bgColor="transparent" :placeholder="true">
            <template #left>
                <view class="flex px-[24rpx] py-[16rpx] border-[1rpx] border-slate-200 rounded-[38rpx]">
                    <up-icon name="arrow-left" size="19" @click="goback"></up-icon>
                    <up-line direction="column" :hairline="false" length="16" margin="0 8px"></up-line>
                    <up-icon name="home" size="20" @click="gohome"></up-icon>
                </view>
            </template>
        </up-navbar>
        <view class="mx-[38rpx] my-[48rpx]">
            <view class="" v-for="(item,index) in list" :key="index">
                <view class="mb-[8rpx] flex justify-between items-center">
                    <view class="color-[#333] font-bold text-[28rpx]">提现</view>
                    <view class="color-[#333] font-bold text-[28rpx]">￥{{ item.amount }}</view>
                </view>
                <view class="color-[#6D6D6D] text-[24rpx] font-normal">提现时间 {{ item.createTimecreateTime }}</view>
            </view>
        </view>
    </view>
</template>

<script setup>
import { reactive, ref } from 'vue'; 
import { onLoad } from '@dcloudio/uni-app';
import { WithdrawalRecord } from '../../API/ReceivingHall';
const {goback,gohome} = useTab()
const { list , getList , pageObj } = useList()
function useTab(){
    const goback = ()=>{
        uni.navigateBack()
    }
    const gohome = ()=>{
        uni.switchTab({
            url:'/pages/index/index'
        })
    }
    return{
        goback,
        gohome
    }
}
function useList(){
    const list = ref([])
    const pageObj = reactive({
        pageNum:1,
        pageSize:10,
        resource:6
    })
    const getList = async ()=>{
        let { data } = await WithdrawalRecord(pageObj)
    }
    return{
        list,
        pageObj,
        getList
    }
}
onLoad(async(options)=>{
    pageObj.resource = options.resource
    await getList()
})
</script>

<style lang="scss" scoped>
</style>